package com.wasion.pwportable.protocol.analyzer.indicator;

import com.wasion.pwportable.protocol.analyzer.AbstractAnalyzer;

/**
 * 
 * @ClassName: ShortElectricField_RD_Analyzer
 * @Description: 82. 瞬时电场、平均电场
 * @author 高意
 * @date 2014-9-10 下午5:00:55
 * 
 */
public class ShortElectricField_RD_Analyzer extends AbstractAnalyzer {

	@Override
	public void dataAnalysis(String ackBS) {

		String data = ackBS.substring(DATABITSTART, DATABITSTART + 8);

		String temp = data.substring(2, 4) + data.substring(0, 2);
		result.setTempElectricField(Integer.parseInt(temp, 16));

		String average = data.substring(6, 8) + data.substring(4, 6);
		result.setAverageElectricField(Integer.parseInt(average, 16));
	}
}
